package com.scu.gkvr_system_backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.scu.gkvr_system_backend.pojo.SchoolScore;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author qinyc
* @description 针对表【gs_li_dist】的数据库操作Mapper
* @createDate 2024-05-11 14:37:28
* @Entity com.qinyc.pojo.GsLiDist
*/
public interface GsLiDistMapper extends BaseMapper<SchoolScore> {

//    @Select("select * from gs_li_score_rank where #{upperRank} <= ((ranking2019 + ranking2020 + ranking2021 + ranking2022 + ranking2023 ) / 5) " +
//            "and ((ranking2019 + ranking2020 + ranking2021 + ranking2022 + ranking2023) / 5) <= #{lowerRank} " +
//            "order by ((ranking2019 + ranking2020 + ranking2021 + ranking2022 + ranking2023) / 5) desc")
    List<SchoolScore> selectRank(@Param("upperRank") int upperRank, @Param("lowerRank") int lowerRank);

    SchoolScore selectBySchoolId(int schoolId);
}




